<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>商品详情</title>
		<link rel="stylesheet" type="text/css" href="css/aui/details.css">
	</head>
	<body>
		<div class="aui-content aui-content-padded">
			<header class="aui-bar aui-bar-nav" style="background:#f5f5f5;">
				<a href="index.html" class="aui-pull-left aui-btn">
					<span class="aui-iconfont aui-icon-left"></span>返回
				</a>
				<div class="aui-title">
					<span>兑换中心</span> 
				</div>
			</header>
			<div class="aui-row">
				<form method="post">
					<div class="aui-col-xs-12" style="text-align:center;">
						<img src="img/sp1.png" class="img-responsive">
					</div>
					<div class="aui-col-xs-6">
						<div class="aui-list">
							<div class="aui-list-item-inner">
								<div class="aui-list-item-title">商品名称：</div>
								<div class="aui-list-item-right">手机充值卡</div>
							</div>
						</div>
					</div>
					<div class="aui-col-xs-6">
						<div class="aui-list">
							<div class="aui-list-item-inner">
								<div class="aui-list-item-title">商品积分：</div>
								<div class="aui-list-item-right">2550<span>积分</span></div>
							</div>
						</div>
					</div>
					<div class="aui-col-xs-12">
						<div class="aui-list">
							<div class="aui-list-item-inner">
								<div class="aui-list-item-title">商品库存：</div>
								<div class="aui-list-item-right">
									5<span>件</span>
									<input type="hidden" value="{{ $list->goods_inventory }}" id="inventory">
								</div>
							</div>
						</div>
					</div>
					<div class="aui-col-xs-12">
						<div class="aui-list">
							<div class="aui-list-item-inner">
								<div class="aui-list-item-title">商品数量：</div>
								<div class="aui-list-item-right" style="margin-top:10px;">
									<a class="aui-btn aui-btn-default aui-btn-xs" id="min" onclick="min1()" style="float:left;">-</a>
									<span style="float:left;">
										<input type="text" name="num" id="num" value="1" style="width:30px;height:30px;text-align:center;">
									</span>
									<a class="aui-btn aui-btn-default aui-btn-xs" id="max" onclick="max1()" style="float:left;">+</a>
								</div>
							</div>
						</div>
					</div>
					<div class="aui-col-xs-6" style="text-align:center;margin-top:50px;">
						<a href="#" class="aui-btn aui-btn-danger">立即兑换</a>
					</div>
					<div class="aui-col-xs-6" style="text-align:center;margin-top:50px;">
						<input type="submit" name="sub" value="加入购物车" class="aui-btn aui-btn-danger">
					</div>
				</form>
				<div class="aui-col-xs-offset-2 aui-col-xs-10" style="margin-top:60px;">
					<h3 style="font-weight:bold;">商品说明</h3>
					<div>&nbsp;&nbsp;描述描述</div>

				</div>
			</div>
			<!-- --底部-- -->
			<div class="bottom">
				<div class="nav-text">
					<a href="login.html">登录</a>
					<a href="register.html" style="border-left:1px solid grey;">注册</a>
					<a href="#" style="border-left:1px solid grey;border-right:1px solid grey;">设置</a>
					<a href="#zong">返回顶部</a>
				</div>
				<div class="nav-pic">
					<a href="#" class="app">
						<span><i></i></span>
						<p>客户端</p>
					</a>
					<a href="#" class="touch">
						<span><i></i></span>
						<p>触屏版</p>
					</a>
					<a href="#" class="pc">
						<span><i></i></span>
						<p>电脑版</p>
					</a>
				</div>
				<div class="copyright">Copyright&nbsp;@&nbsp;2007-2016 Bizpower版权所有</div>
			</div>
		</div>
		<script>
		var inventory=document.getElementById("inventory");
		var min=document.getElementById("min");
		var num=document.getElementById("num");
		var max=document.getElementById("max");

		function min1(){
			if(num.value<=1){
				num.innerHTML=1;
			}else{
				num.value-=1;
				num.innerHTML=num.value;
			}
		}
		function max1(){
			var num1 =parseInt(num.value);
			var inventory1=inventory.value;
			if(num1 >= 5){
				num.value=5;
			}
			else{
				num.value=num1+1;
			}
		}
	</script>
	</body>
</html>